#include "Drawable.h"

namespace yzrilyzr_simplecanvas{
	void Drawable::setBounds(int32_t l, int32_t t, int32_t r, int32_t b){
		Rect r2{l, t, r, b};
		setBounds(r2);
	}
	Rect & Drawable::getBounds(){
		return bounds;
	}
	void Drawable::setBounds(Rect & rect){
		Rect old=bounds;
		if(old != rect){
			if(!old.isEmpty())
				invalidateSelf();
			bounds.set(rect);
			onBoundsChange(bounds);
		}
	}
}